if list = '' then exit_msg("Page Genies not installed properly. Please reninstall")
list = ppm_SelectFromList("Select type of Genie..", 30, 5, 0, list)
if list = '' then exit_msg()
lastdir = ''
filename = sourcedir'/'list'_pgtp'
if ~open(file, filename, "r") then
exit_msg("An error has occured reading the PageGenie template file!")
/* Initialize font list */
font = FontList.rexx()
call ppm_SetBoxOutlines(1)
currentbox = 0
gutter = .25
cols = 3
update = 1
if ppm_Inform(2, "Would you like to turn off the auto update to speed up screen refresh? Some text updates may appear to lag a step behind.", "No", "Yes") then
do
call ppm_AutoUpdate(0)
update = 0
end
do while ~eof(file)
line = readln(file)
parse var line command ';' .
command = strip(upper(command))
if pos(command, functions) ~= 0 then
interpret "call "command"(line)"
else if line ~= '' & pos('/*', line) = 0 & pos('*/', line) = 0 then
call ppm_Inform(1,"Could not understand line: "line,)
end
exit_msg("")
EXECUTEGENIE: procedure expose sourcedir units
do
parse arg line
parse var line command ';' geniename ';' extension
if pos(".pgen", geniename) ~= 0 then
do
pgen = 1
root = sourcedir'/'
end
else root = ''
if geniename = '' then
do
list = getdirlist.rexx(sourcedir, extension)
if list = '' then return
geniename = ppm_SelectFromList("Select a Genie..", 30, 5, 0, list)
if geniename = '' then return
geniename = geniename||extension
end
if ~exists(root||geniename) then
do
call ppm_Inform(1,"Unable to locate Genie: "geniename,)